\hypertarget{group___spherical}{
\section{\-Mappings}
\label{group___spherical}\index{\-Mappings@{\-Mappings}}
}
\subsection*{\-Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structnih_1_1_s_h__basis}{nih\-::\-S\-H\-\_\-basis$<$ L $>$}
\end{DoxyCompactItemize}
\subsection*{\-Functions}
\begin{DoxyCompactItemize}
\item 
\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector3f \hyperlink{group___spherical_gabb50d34723dc8f63f83481dda7e4538a}{nih\-::from\-\_\-spherical\-\_\-coords} (const \-Vector2f \&uv)
\item 
\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f \hyperlink{group___spherical_gae14d642cb444062ebf966fc27f379972}{nih\-::to\-\_\-spherical\-\_\-coords} (const \-Vector3f \&vec)
\item 
\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f \hyperlink{group___spherical_ga5852f54031a04a3c2622ac9c1c3ee181}{nih\-::square\-\_\-to\-\_\-unit\-\_\-disk} (const \-Vector2f uv)
\item 
\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f \hyperlink{group___spherical_ga4c1322b35d3548385cfbcde647eaa9b6}{nih\-::unit\-\_\-disk\-\_\-to\-\_\-square} (const \-Vector2f disk)
\item 
\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector3f \hyperlink{group___spherical_ga8b4bb2387e2dcc609267e00777c753d1}{nih\-::square\-\_\-to\-\_\-cosine\-\_\-hemisphere} (const \-Vector2f \&uv)
\item 
\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f \hyperlink{group___spherical_ga1e65205c0882ccfa8b8cea7ab18525ce}{nih\-::cosine\-\_\-hemisphere\-\_\-to\-\_\-square} (const \-Vector3f \&dir)
\item 
\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector3f \hyperlink{group___spherical_ga711e9a117559053c96478f404aa2a278}{nih\-::uniform\-\_\-square\-\_\-to\-\_\-sphere} (const \-Vector2f \&uv)
\item 
\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f \hyperlink{group___spherical_ga74d80bd5bc66492ae691520586329be5}{nih\-::uniform\-\_\-sphere\-\_\-to\-\_\-square} (const \-Vector3f \&vec)
\item 
{\footnotesize template$<$typename Vector3 $>$ }\\\-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float \hyperlink{group___spherical_ga61b3dccbdbb3265ced8cfefc49c4f96c}{nih\-::sh} (const int32 l, const int32 m, const \-Vector3 \&v)
\item 
{\footnotesize template$<$int32 l, typename Vector3 $>$ }\\\-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float \hyperlink{group___spherical_ga84c13afac74205bed1f5f3a382088394}{nih\-::sh} (const int32 m, const \-Vector3 \&v)
\item 
{\footnotesize template$<$int32 l, int32 m, typename Vector3 $>$ }\\\-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float \hyperlink{group___spherical_ga093407ba5202540f5ca6cc3da2567970}{nih\-::sh} (const \-Vector3 \&v)
\item 
{\footnotesize template$<$typename Z\-H\-Vector , typename S\-H\-Vector , typename Vector3 $>$ }\\\-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void \hyperlink{group___spherical_gac4367786c521d9b0e54b08dd27bcc391}{nih\-::rotate\-\_\-\-Z\-H} (const int32 \-L, const \-Z\-H\-Vector \&zh\-\_\-coeff, const \-Vector3 \&d, \-S\-H\-Vector \&sh\-\_\-coeff)
\item 
{\footnotesize template$<$int32 \-L, typename Z\-H\-Vector , typename S\-H\-Vector , typename Vector3 $>$ }\\\-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void \hyperlink{group___spherical_gad3026df527a2ed22cead3594bdd25b19}{nih\-::rotate\-\_\-\-Z\-H} (const \-Z\-H\-Vector \&zh\-\_\-coeff, const \-Vector3 \&d, \-S\-H\-Vector \&sh\-\_\-coeff)
\item 
{\footnotesize template$<$int32 l, int32 m, typename Vector3 $>$ }\\\-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float \hyperlink{group___spherical_ga0cea7b5e2aa00742a2e8d00af322edf3}{nih\-::rotate\-\_\-\-Z\-H} (const float zh\-\_\-l, const \-Vector3 \&d)
\end{DoxyCompactItemize}


\subsection{\-Function \-Documentation}
\hypertarget{group___spherical_ga1e65205c0882ccfa8b8cea7ab18525ce}{
\index{\-Mappings@{\-Mappings}!cosine\-\_\-hemisphere\-\_\-to\-\_\-square@{cosine\-\_\-hemisphere\-\_\-to\-\_\-square}}
\index{cosine\-\_\-hemisphere\-\_\-to\-\_\-square@{cosine\-\_\-hemisphere\-\_\-to\-\_\-square}!Mappings@{\-Mappings}}
\subsubsection[{cosine\-\_\-hemisphere\-\_\-to\-\_\-square}]{\setlength{\rightskip}{0pt plus 5cm}\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f nih\-::cosine\-\_\-hemisphere\-\_\-to\-\_\-square (
\begin{DoxyParamCaption}
\item[{const \-Vector3f \&}]{dir}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group___spherical_ga1e65205c0882ccfa8b8cea7ab18525ce}
inverts the square to cosine-\/weighted hemisphere mapping


\begin{DoxyParams}{\-Parameters}
{\em dir} & 3d direction \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_gabb50d34723dc8f63f83481dda7e4538a}{
\index{\-Mappings@{\-Mappings}!from\-\_\-spherical\-\_\-coords@{from\-\_\-spherical\-\_\-coords}}
\index{from\-\_\-spherical\-\_\-coords@{from\-\_\-spherical\-\_\-coords}!Mappings@{\-Mappings}}
\subsubsection[{from\-\_\-spherical\-\_\-coords}]{\setlength{\rightskip}{0pt plus 5cm}\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector3f nih\-::from\-\_\-spherical\-\_\-coords (
\begin{DoxyParamCaption}
\item[{const \-Vector2f \&}]{uv}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group___spherical_gabb50d34723dc8f63f83481dda7e4538a}
maps a point in spherical coordinates to the unit sphere


\begin{DoxyParams}{\-Parameters}
{\em uv} & uv coordinates \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_gac4367786c521d9b0e54b08dd27bcc391}{
\index{\-Mappings@{\-Mappings}!rotate\-\_\-\-Z\-H@{rotate\-\_\-\-Z\-H}}
\index{rotate\-\_\-\-Z\-H@{rotate\-\_\-\-Z\-H}!Mappings@{\-Mappings}}
\subsubsection[{rotate\-\_\-\-Z\-H}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Z\-H\-Vector , typename S\-H\-Vector , typename Vector3 $>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void nih\-::rotate\-\_\-\-Z\-H (
\begin{DoxyParamCaption}
\item[{const int32}]{\-L, }
\item[{const \-Z\-H\-Vector \&}]{zh\-\_\-coeff, }
\item[{const \-Vector3 \&}]{d, }
\item[{\-S\-H\-Vector \&}]{sh\-\_\-coeff}
\end{DoxyParamCaption}
)}}
\label{group___spherical_gac4367786c521d9b0e54b08dd27bcc391}
rotate a zonal harmonics to an arbitrary direction vector


\begin{DoxyParams}{\-Parameters}
{\em \-L} & number of bands \\
\hline
{\em zh\-\_\-coeff} & input \-Zonal \-Harmonics coefficients \\
\hline
{\em d} & input vector \\
\hline
{\em sh\-\_\-coeff} & output \-Spherical \-Harmonics coefficients \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_gad3026df527a2ed22cead3594bdd25b19}{
\index{\-Mappings@{\-Mappings}!rotate\-\_\-\-Z\-H@{rotate\-\_\-\-Z\-H}}
\index{rotate\-\_\-\-Z\-H@{rotate\-\_\-\-Z\-H}!Mappings@{\-Mappings}}
\subsubsection[{rotate\-\_\-\-Z\-H}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 \-L, typename Z\-H\-Vector , typename S\-H\-Vector , typename Vector3 $>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void nih\-::rotate\-\_\-\-Z\-H (
\begin{DoxyParamCaption}
\item[{const \-Z\-H\-Vector \&}]{zh\-\_\-coeff, }
\item[{const \-Vector3 \&}]{d, }
\item[{\-S\-H\-Vector \&}]{sh\-\_\-coeff}
\end{DoxyParamCaption}
)}}
\label{group___spherical_gad3026df527a2ed22cead3594bdd25b19}
rotate a zonal harmonics to an arbitrary direction vector, with the number of bands specified at compile-\/time.


\begin{DoxyParams}{\-Parameters}
{\em zh\-\_\-coeff} & input \-Zonal \-Harmonics coefficients \\
\hline
{\em d} & input vector \\
\hline
{\em sh\-\_\-coeff} & output \-Spherical \-Harmonics coefficients \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga0cea7b5e2aa00742a2e8d00af322edf3}{
\index{\-Mappings@{\-Mappings}!rotate\-\_\-\-Z\-H@{rotate\-\_\-\-Z\-H}}
\index{rotate\-\_\-\-Z\-H@{rotate\-\_\-\-Z\-H}!Mappings@{\-Mappings}}
\subsubsection[{rotate\-\_\-\-Z\-H}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 l, int32 m, typename Vector3 $>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float nih\-::rotate\-\_\-\-Z\-H (
\begin{DoxyParamCaption}
\item[{const float}]{zh\-\_\-l, }
\item[{const \-Vector3 \&}]{d}
\end{DoxyParamCaption}
)}}
\label{group___spherical_ga0cea7b5e2aa00742a2e8d00af322edf3}
return the (l,m) spherical harmonics coefficient of a zonal harmonics function rotated to match a given axis.


\begin{DoxyParams}{\-Parameters}
{\em zh\-\_\-l} & l-\/band zonal harmonics coefficient \\
\hline
{\em d} & input vector \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga61b3dccbdbb3265ced8cfefc49c4f96c}{
\index{\-Mappings@{\-Mappings}!sh@{sh}}
\index{sh@{sh}!Mappings@{\-Mappings}}
\subsubsection[{sh}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Vector3 $>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float nih\-::sh (
\begin{DoxyParamCaption}
\item[{const int32}]{l, }
\item[{const int32}]{m, }
\item[{const \-Vector3 \&}]{v}
\end{DoxyParamCaption}
)}}
\label{group___spherical_ga61b3dccbdbb3265ced8cfefc49c4f96c}
evaluate the (l,m)-\/th basis function on a given vector


\begin{DoxyParams}{\-Parameters}
{\em l} & band index \\
\hline
{\em m} & subband index \\
\hline
{\em v} & input vector \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga84c13afac74205bed1f5f3a382088394}{
\index{\-Mappings@{\-Mappings}!sh@{sh}}
\index{sh@{sh}!Mappings@{\-Mappings}}
\subsubsection[{sh}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 l, typename Vector3 $>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float nih\-::sh (
\begin{DoxyParamCaption}
\item[{const int32}]{m, }
\item[{const \-Vector3 \&}]{v}
\end{DoxyParamCaption}
)}}
\label{group___spherical_ga84c13afac74205bed1f5f3a382088394}
evaluate the (l,m)-\/th basis function on a given vector, where l is determined at compile-\/time.


\begin{DoxyParams}{\-Parameters}
{\em m} & subband index \\
\hline
{\em v} & input vector \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga093407ba5202540f5ca6cc3da2567970}{
\index{\-Mappings@{\-Mappings}!sh@{sh}}
\index{sh@{sh}!Mappings@{\-Mappings}}
\subsubsection[{sh}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 l, int32 m, typename Vector3 $>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float nih\-::sh (
\begin{DoxyParamCaption}
\item[{const \-Vector3 \&}]{v}
\end{DoxyParamCaption}
)}}
\label{group___spherical_ga093407ba5202540f5ca6cc3da2567970}
evaluate the (l,m)-\/th basis function on a given vector, where l and m are determined at compile-\/time.


\begin{DoxyParams}{\-Parameters}
{\em v} & input vector \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga8b4bb2387e2dcc609267e00777c753d1}{
\index{\-Mappings@{\-Mappings}!square\-\_\-to\-\_\-cosine\-\_\-hemisphere@{square\-\_\-to\-\_\-cosine\-\_\-hemisphere}}
\index{square\-\_\-to\-\_\-cosine\-\_\-hemisphere@{square\-\_\-to\-\_\-cosine\-\_\-hemisphere}!Mappings@{\-Mappings}}
\subsubsection[{square\-\_\-to\-\_\-cosine\-\_\-hemisphere}]{\setlength{\rightskip}{0pt plus 5cm}\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector3f nih\-::square\-\_\-to\-\_\-cosine\-\_\-hemisphere (
\begin{DoxyParamCaption}
\item[{const \-Vector2f \&}]{uv}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group___spherical_ga8b4bb2387e2dcc609267e00777c753d1}
maps the unit square to the hemisphere with a cosine-\/weighted distribution


\begin{DoxyParams}{\-Parameters}
{\em uv} & uv coordinates \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga5852f54031a04a3c2622ac9c1c3ee181}{
\index{\-Mappings@{\-Mappings}!square\-\_\-to\-\_\-unit\-\_\-disk@{square\-\_\-to\-\_\-unit\-\_\-disk}}
\index{square\-\_\-to\-\_\-unit\-\_\-disk@{square\-\_\-to\-\_\-unit\-\_\-disk}!Mappings@{\-Mappings}}
\subsubsection[{square\-\_\-to\-\_\-unit\-\_\-disk}]{\setlength{\rightskip}{0pt plus 5cm}\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f nih\-::square\-\_\-to\-\_\-unit\-\_\-disk (
\begin{DoxyParamCaption}
\item[{const \-Vector2f}]{uv}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group___spherical_ga5852f54031a04a3c2622ac9c1c3ee181}
map a point on \mbox{[}0,1\mbox{]}$^\wedge$2 to a uniformly distributed point on a disk of radius 1


\begin{DoxyParams}{\-Parameters}
{\em uv} & uv coordinates \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_gae14d642cb444062ebf966fc27f379972}{
\index{\-Mappings@{\-Mappings}!to\-\_\-spherical\-\_\-coords@{to\-\_\-spherical\-\_\-coords}}
\index{to\-\_\-spherical\-\_\-coords@{to\-\_\-spherical\-\_\-coords}!Mappings@{\-Mappings}}
\subsubsection[{to\-\_\-spherical\-\_\-coords}]{\setlength{\rightskip}{0pt plus 5cm}\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f nih\-::to\-\_\-spherical\-\_\-coords (
\begin{DoxyParamCaption}
\item[{const \-Vector3f \&}]{vec}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group___spherical_gae14d642cb444062ebf966fc27f379972}
computes the spherical coordinates of a 3d point


\begin{DoxyParams}{\-Parameters}
{\em vec} & 3d direction \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga74d80bd5bc66492ae691520586329be5}{
\index{\-Mappings@{\-Mappings}!uniform\-\_\-sphere\-\_\-to\-\_\-square@{uniform\-\_\-sphere\-\_\-to\-\_\-square}}
\index{uniform\-\_\-sphere\-\_\-to\-\_\-square@{uniform\-\_\-sphere\-\_\-to\-\_\-square}!Mappings@{\-Mappings}}
\subsubsection[{uniform\-\_\-sphere\-\_\-to\-\_\-square}]{\setlength{\rightskip}{0pt plus 5cm}\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f nih\-::uniform\-\_\-sphere\-\_\-to\-\_\-square (
\begin{DoxyParamCaption}
\item[{const \-Vector3f \&}]{vec}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group___spherical_ga74d80bd5bc66492ae691520586329be5}
maps the sphere to a unit square with a uniform distribution


\begin{DoxyParams}{\-Parameters}
{\em dir} & 3d direction \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga711e9a117559053c96478f404aa2a278}{
\index{\-Mappings@{\-Mappings}!uniform\-\_\-square\-\_\-to\-\_\-sphere@{uniform\-\_\-square\-\_\-to\-\_\-sphere}}
\index{uniform\-\_\-square\-\_\-to\-\_\-sphere@{uniform\-\_\-square\-\_\-to\-\_\-sphere}!Mappings@{\-Mappings}}
\subsubsection[{uniform\-\_\-square\-\_\-to\-\_\-sphere}]{\setlength{\rightskip}{0pt plus 5cm}\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector3f nih\-::uniform\-\_\-square\-\_\-to\-\_\-sphere (
\begin{DoxyParamCaption}
\item[{const \-Vector2f \&}]{uv}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group___spherical_ga711e9a117559053c96478f404aa2a278}
maps the unit square to the sphere with a uniform distribution


\begin{DoxyParams}{\-Parameters}
{\em uv} & uv coordinates \\
\hline
\end{DoxyParams}
\hypertarget{group___spherical_ga4c1322b35d3548385cfbcde647eaa9b6}{
\index{\-Mappings@{\-Mappings}!unit\-\_\-disk\-\_\-to\-\_\-square@{unit\-\_\-disk\-\_\-to\-\_\-square}}
\index{unit\-\_\-disk\-\_\-to\-\_\-square@{unit\-\_\-disk\-\_\-to\-\_\-square}!Mappings@{\-Mappings}}
\subsubsection[{unit\-\_\-disk\-\_\-to\-\_\-square}]{\setlength{\rightskip}{0pt plus 5cm}\-N\-I\-H\-\_\-\-H\-O\-S\-T \-N\-I\-H\-\_\-\-D\-E\-V\-I\-C\-E \-Vector2f nih\-::unit\-\_\-disk\-\_\-to\-\_\-square (
\begin{DoxyParamCaption}
\item[{const \-Vector2f}]{disk}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group___spherical_ga4c1322b35d3548385cfbcde647eaa9b6}
diskx, disky is point on radius 1 disk. x, y is point on \mbox{[}0,1\mbox{]}$^\wedge$2


\begin{DoxyParams}{\-Parameters}
{\em disk} & disk point \\
\hline
\end{DoxyParams}
